﻿using System.ComponentModel.DataAnnotations;

namespace EFCoreBest.Domain
{
    public class OrderItem : Entity
    {
        [Required]
        public int OrderId { get; set; }

        public virtual Order Order { get; set; }

        [Required]
        public int ProductId { get; set; }

        public Product Product { get; set; }

        [Required]
        public int Count { get; set; }

        [Required]
        public decimal Price { get; set; }
    }
}